<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: RestController</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">RestController</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/rest_controller_rb.html">
                rest_controller.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="ApplicationController.html">
                ApplicationController
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Clase para la interaccion REST con otras redes sociales. Contiene los
metodos de acceso a la informacion de TripBook para las demas aplicaciones.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000040">itinerariesByTrip</a>&nbsp;&nbsp;
      <a href="#M000041">prueba</a>&nbsp;&nbsp;
      <a href="#M000039">tripsByUser</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">TRAVELERNET_URL</td>
          <td>=</td>
          <td class="context-item-value">&quot;http://192.168.21.83:8000/travelernet/rest/&quot;</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000040" class="method-detail">
        <a name="M000040"></a>

        <div class="method-heading">
          <a href="RestController.src/M000040.html" target="Code" class="method-signature"
            onclick="popupCode('RestController.src/M000040.html');return false;">
          <span class="method-name">itinerariesByTrip</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <pre>
 Metodo de acceso a los itinerarios de cierto viaje.
 Se accede mediante la direccion: &quot;../rest/{NOMBRE_DE_USUARIO}/{ID_DEL_VIAJE}&quot;
 Si el usuario existe y el viaje tambien, se devuelve un XML con el siguiente
 formato:
</pre>
<p>
&lt;itineraries type=&quot;array&quot;&gt;-
</p>
<pre>
      &lt;itinerary&gt;
              &lt;created-at type=&quot;datetime&quot;&gt;...&lt;/created-at&gt;
              &lt;id type=&quot;integer&quot;&gt;...&lt;/id&gt;
              &lt;iti-description&gt;...&lt;/iti-description&gt;
              &lt;iti-end-date type=&quot;datetime&quot;&gt;...&lt;/iti-end-date&gt;
              &lt;iti-image-url&gt;...&lt;/iti-image-url&gt;
              &lt;iti-latitude&gt;...&lt;/iti-latitude&gt;
              &lt;iti-location&gt;...&lt;/iti-location&gt;
              &lt;iti-longitude&gt;...&lt;/iti-longitude&gt;
              &lt;iti-start-date type=&quot;datetime&quot;&gt;...&lt;/iti-start-date&gt;
              &lt;iti-status type=&quot;integer&quot;&gt;...&lt;/iti-status&gt;
              &lt;iti-votes type=&quot;integer&quot;&gt;...&lt;/iti-votes&gt;
              &lt;trip-id type=&quot;integer&quot;&gt;...&lt;/trip-id&gt;
              &lt;updated-at type=&quot;datetime&quot;&gt;...&lt;/updated-at&gt;
              &lt;user-id type=&quot;integer&quot;&gt;...&lt;/user-id&gt;
      &lt;/itinerary&gt;
      ...
</pre>
<p>
&lt;/itineraries&gt;
</p>
        </div>
      </div>

      <div id="method-M000041" class="method-detail">
        <a name="M000041"></a>

        <div class="method-heading">
          <a href="RestController.src/M000041.html" target="Code" class="method-signature"
            onclick="popupCode('RestController.src/M000041.html');return false;">
          <span class="method-name">prueba</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000039" class="method-detail">
        <a name="M000039"></a>

        <div class="method-heading">
          <a href="RestController.src/M000039.html" target="Code" class="method-signature"
            onclick="popupCode('RestController.src/M000039.html');return false;">
          <span class="method-name">tripsByUser</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Metodo de acceso a los viajes de cierto usuario. Se accede mediante la
direccion: &quot;../rest/{NOMBRE_DE_USUARIO}&quot; Si el usuario existe, se
devuelve un XML con el siguiente formato: &lt;trips&gt;
</p>
<pre>
     &lt;trip&gt;
             &lt;created-at&gt;...&lt;/created-at&gt;
             &lt;id&gt;...&lt;/id&gt;
             &lt;tri-city&gt;...&lt;/tri-city&gt;
             &lt;tri-country&gt;...&lt;/tri-country&gt;
             &lt;tri-end-date&gt;...&lt;/tri-end-date&gt;
             &lt;tri-lodging&gt;...&lt;/tri-lodging&gt;
             &lt;tri-shared&gt;...&lt;/tri-shared&gt;
             &lt;tri-start-date&gt;...&lt;/tri-start-date&gt;
             &lt;tri-status&gt;...&lt;/tri-status&gt;
             &lt;updated-at&gt;...&lt;/updated-at&gt;
             &lt;user-id&gt;...&lt;/user-id&gt;
     &lt;/trip&gt;
     ...
</pre>
<p>
&lt;trips&gt;
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>